# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
# Contributor: Konstantin Shalygin <k0ste@k0ste.ru>

pkgname=python-ovirt-engine-sdk
pkgver=4.5.1
pkgrel=2
pkgdesc='Python access to the oVirt Engine API'
arch=('loong64' 'x86_64')
url='http://ovirt.org/develop/release-management/features/infra/python-sdk'
depends=('python-pycurl' 'python-six' 'libxml2')
makedepends=('python-setuptools')
license=('custom')
source=("$pkgname-$pkgver.tar.gz::https://github.com/oVirt/python-ovirt-engine-sdk4/archive/refs/tags/$pkgver.tar.gz")
sha512sums=('a1e9636cb1c2791125308a21afa16d434c12d8274312274bfe829a97f967177318ae381c3fe06cc0861db497af8c0572c7c45ad446b2e46e7bbe60f30cd49f89')

package() {
  cd python-ovirt-engine-sdk4-$pkgver

  # We just run this command for the templating that it does, we don't do rpms in Arch
  .automation/build-srpm.sh || true

  python setup.py install -O1 --root="${pkgdir}"

  install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
